// ie polyfill
import '@babel/polyfill'

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/'
import { VueAxios } from './utils/request'
import VueLazyload from 'vue-lazyload'
import { ColorPicker,Upload,Form, FormItem } from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

//  权限处理
import './permission';

Vue.use(ColorPicker);
Vue.use(Upload);
Vue.use( Form);
Vue.use( FormItem);
// mock
import './mock'

//v lazy
Vue.use(VueLazyload, {
    throttleWait: 400,
    attempt:1,
    error: '/assets/lost.jpg',
    loading: '/assets/timg.gif',
});

import bootstrap from './core/bootstrap'
import './core/use'
import './utils/filter' // global filter
import '@crms/hooks'

Vue.config.productionTip = false

// mount axios Vue.$http and this.$http
Vue.use(VueAxios);

new Vue({
    router,
    store,
    created () {
        bootstrap()
    },
    render: h => h(App)
}).$mount('#app');
